const routes = [
    {
        path: '/index',
        name: 'index',
        meta:{title:'index'},
        component: () => import('../views/Index.vue'),
        children: [ //二级路由
            {
                path: '/index/home',
                name: 'home',
                meta:{title:'首页'},
                component: () => import('../views/Index/Home.vue')
            },
            {
                path: '/index/tuan',
                name: 'tuan',
                meta:{title:'爆爆团'},
                component: () => import('../views/Index/Tuan.vue'),
                children:[  //三级路由
                    {
                        path: '/index/tuan/qianggou',
                        name: 'qianggou',
                        meta:{title:'抢购'},
                        component: () => import('../views/Index/Tuan/Qianggou.vue')
                    },
                    {
                        path: '/index/tuan/shangxin',
                        name: 'shangxin',
                        meta:{title:'上新'},
                        component: () => import('../views/Index/Tuan/Shangxin.vue')
                    },
                    {
                        path: '/index/tuan',
                        redirect: '/index/tuan/qianggou'
                    }
                ]
            },
            {
                path: '/index/order',
                name: 'order',
                meta:{title:'订单'},
                component: () => import('../views/Index/Order.vue')
            },
            {
                path: '/index/mine',
                name: 'mine',
                meta:{title:'我的'},
                component: () => import('../views/Index/Mine.vue')
            }
        ]
    },
    {
        path: '/login',
        name: 'login',
        meta:{title:'登录'},
        component: () => import('../views/Login.vue')
    },
    {
        path: '/register',
        name: 'register',
        meta:{title:'注册'},
        component: () => import('../views/Register.vue')
    },
    {
        path: '/',
        redirect: '/index/home'
    },

    {
        path:'*',
        component: () => import('../views/NotFound.vue')
    }
]
export default routes